/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.base.domain.req;

import com.xy.lang.validation.UpdateChecks;
import com.xy.lang.validation.annotation.AlertMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 *
 *
 * @author zsp
 * @date 2021-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class SaveBomRequest {

    /**
     * 物料清单Id
     */
    @NotNull(groups = UpdateChecks.class)
    @ApiModelProperty(value = "物料清单Id")
    private Long bomId;
    /**
     * 生产货品Id
     */
    @NotNull(message = "goodsId")
    @AlertMessage(code = "goodsId", msg = "生产货品Id不能为空")
    @ApiModelProperty(value = "生产货品Id")
    private Long goodsId;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String memo;

    /**
     * 单位
     */
    @NotEmpty
    @ApiModelProperty(value = "单位")
    private String unit;

    /**
     * 审核状态：0-待审核，1-审核通过，2-审核不通过
     */
    @ApiModelProperty(value = "审核状态：0-待审核，1-审核通过，2-审核不通过")
    private Integer auditStatus;

    /**
     * 审核评语
     */
    @ApiModelProperty(value = "审核评语")
    private String auditComment;

    /**
     * 状态：0-存盘，1-启用，2-停用
     */
    @ApiModelProperty(value = "状态：0-存盘，1-启用，2-停用")
    private Integer status;
    /**
     * 应用范围：0-未定义，1-生产，2-研发，3-质检，9-其它
     */
    private Integer scope;
    /**
     * 物料货品明细
     */
    private List<SaveBomGoodsRequest> goodsList;

    /**
     * 物料货品明细
     */
    private List<SaveBomEquipmentRequest> equipmentList;

}
